'use strict';
module.exports = {
	/**
	 * XXXnameXXX
	 * @url client/user/kh/wxads/get_adreward_list 前端调用的url参数地址
	 * data 请求参数
	 * @param {String} params1  参数1
	 */
	main: async (event) => {
		const db = uniCloud.database();
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, _ } = util;
		let { uid, todayStart } = data;
		let res = { code: 0, msg: "" };
		// 业务逻辑开始-----------------------------------------------------------
		//今日观看广告数据
		res.list = await db.collection('a_wxads').where({
			user_id: userInfo._id,
			_add_time: _.gt(todayStart),
			type: "wxads"
		}).get()

		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
